import request from "@/axios";

// 检查用户是否认证
export const checkUserCertified = () =>
  request({
    url: "/api/user/checkauthuser",
    method: "get"
  });

// 企业认证
export const userJoinCompany = option =>
  request({
    url: "/api/company/userjoincompany",
    method: "get",
    params: option
  });

// 认证新企业
export const authNewCompany = option =>
  request({
    url: "/api/remotesource/esigncompanyfourfactors",
    method: "post",
    data: option
  });

// 个人核身刷脸认证
export const userfaceauth = option =>
  request({
    url: "/api/remotesource/esignuserface",
    method: "post",
    data: option
  });

// 个人认证-发起运营商3要素核身认证
export const sendCertificationMsg = option =>
  request({
    url: "/api/remotesource/esignusertelecomthreefactors",
    method: "post",
    data: option
  });

// 个人认证-运营商短信验证码校验
export const checkoutCertificationMsg = option =>
  request({
    url: "/api/remotesource/esignverifytelecomthreefactors",
    method: "post",
    data: option
  });

// 获取打款次数
export const getRemittancecount = option =>
  request({
    url: "/api/remotesource/getremittancecount",
    method: "get",
    params: option
  });

// 获取回填金额次数
export const getrandomamountcount = option =>
  request({
    url: "/api/remotesource/getrandomamountcount",
    method: "get",
    params: option
  });

// 查询打款银行信息
export const getSubbranch = option =>
  request({
    url: "/api/remotesource/esignsubbranch",
    method: "post",
    data: option
  });

// 获取用户的认证状态
export const getUserAuthstate = () =>
  request({
    url: "/api/company/getuserauthstate",
    method: "get"
  });

// 校验公司是否认证
export const checkAuthCompany = option =>
  request({
    url: "/api/company/checkauthcompany",
    method: "post",
    data: option
  });

// 对公账户认证
export const authCorporateAccount = option =>
  request({
    url: "/api/remotesource/esigntransferrandomamount",
    method: "post",
    data: option
  });

// 回填金额
export const verifyRandomAmount = option =>
  request({
    url: "/api/remotesource/esignverifyrandomamount",
    method: "post",
    data: option
  });

// 删除企业认证信息，用于在回填金额页面返回企业认证
export const removeCompanyAuth = option =>
  request({
    url: "/api/company/removecompanypreauth",
    method: "get",
    params: option
  });

// 重新打款
export const reversePayment = option =>
  request({
    url: "/api/remotesource/esignreversepayment",
    method: "get",
    params: option
  });

// 查询认证状态
export const esignauthdetail = option =>
  request({
    url: "/api/remotesource/esignauthdetail",
    method: "get",
    params: option
  });
